Load and clean data

Add Regions + Explore Data

Regions:

  • S. Texas (Matagorda Bay south)
  • TX/LA: (between Matagorda Bay and MS River delta)
  • MS Bight: LA east of MS River, MS, AL
  • Florida

Map Stations with Repro Data


Fix Egg Volume Measurement

I noticed a few crabs had egg sizes that were much higher than others, so going to recalculate the volume from the egg dimensions to compare.

So the excel file on the dropbox has some inconsistencies with the estimated fecundity, and other columns that were drag-down in excel.

The values that appeared much higher have the correct volume calculations, the others have something different.

finish analysis with new_vol.

Pull Crab Specific Fecundity Details:

For analyses relating to egg characteristics (egg volume, estimated fecundity), measurements will be the mean value for each crab to avoid dealing with repeated measures.


Exploratory Plots

1. egg volume ~ carapace width

2. Egg Volume ~ Egg Stage


Estimated Fecundity Models

Fecundity Range :

Estimated fecundity ranged from 1.075 - 8.929 million eggs.

With mean fecundity of 3.268 +/- 0.148 millions of eggs.

Region intercepts (ANCOVA)

term estimate std.error statistic p.value
(Intercept) 11.8221003 0.3503094 33.7475992 0.0000000
Carapace_width 0.0194279 0.0018893 10.2832958 0.0000000
regionLouisiana 0.0363446 0.1550486 0.2344080 0.8153726
regionMS Bight -0.1780774 0.1817878 -0.9795894 0.3307612
regionTexas 0.1358823 0.1543131 0.8805625 0.3816563

Carapace width region interaction

If we include region in the model we get kind of a weird result, that being that carapace width is no longer significant:

term estimate std.error statistic p.value
(Intercept) 13.5008959 1.2522673 10.7811611 0.0000000
Carapace_width 0.0093685 0.0076467 1.2251764 0.2249299
regionLouisiana -1.6809199 1.3620065 -1.2341496 0.2215907
regionMS Bight 0.2181973 1.6094676 0.1355711 0.8925793
regionTexas -1.8680225 1.3186960 -1.4165680 0.1613842
Carapace_width:regionLouisiana 0.0102844 0.0082595 1.2451667 0.2175408
Carapace_width:regionMS Bight -0.0023466 0.0098237 -0.2388744 0.8119545
Carapace_width:regionTexas 0.0120422 0.0080441 1.4970240 0.1392274

Which is confusing because its pretty clear on its own.


Carapace Width & Season

Check Season as well just to be sure.

term estimate std.error statistic p.value
(Intercept) 11.9795124 0.3528126 33.9543210 0.000000
Carapace_width 0.0182437 0.0019520 9.3459375 0.000000
SeasonSummer 0.1033463 0.1238141 0.8346898 0.406732

Model Comparison Table

Resid. Df Resid. Dev dAIC weight
68 4.573742e+13 0.0 0.56
65 4.263123e+13 0.9 0.36
71 5.238409e+13 3.9 0.08
71 5.978975e+13 13.6 0.00

Egg size models

Investigate Seasons - individual eggs

(if we have fall egg sizes), we do not have enough (n = 5)

We also have repeated measures for measurements on each egg mass, so gonna have the eggmass/crabID as a random effect as they are likely correlated. Otherwise we could use the average egg measurements for each crab.


GLM - individual eggs

term estimate std.error statistic p.value
(Intercept) 0.0089874 0.0004836 18.583181 0.00000
Carapace_width -0.0000101 0.0000031 -3.314658 0.00094


GLM - eggmass means

term estimate std.error statistic p.value
(Intercept) 0.0090056 0.0019002 4.7392833 0.0000107
Carapace_width -0.0000103 0.0000120 -0.8545614 0.3956683

Mixed Model - individual eggs

effect group term estimate std.error statistic
fixed NA (Intercept) 0.0090054 0.0019002 4.7390351
fixed NA Carapace_width -0.0000103 0.0000120 -0.8543744
ran_pars Unique_ID sd__(Intercept) 0.0017042 NA NA
ran_pars Residual sd__Observation 0.0010002 NA NA

Mixed Model Diagnostics

Mixed Model Inference

Analysis of Variance Table
               Df     Sum Sq    Mean Sq F value
Carapace_width  1 7.3021e-07 7.3021e-07    0.73
Data: eggdat
Models:
m1: new_vol ~ Carapace_width
m2: new_vol ~ Carapace_width + (1 | Unique_ID)
   Df    AIC    BIC logLik deviance  Chisq Chi Df Pr(>Chisq)    
m1  3 -14101 -14086 7053.7   -14107                             
m2  4 -15767 -15746 7887.4   -15775 1667.5      1  < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Variance Explained By Random Effect

This is the variance explained after the fixed effects : 74.39


Egg size ~ CW * region - eggmass mean

Plot the overall relationship first

Region seems to have a viable impact, but it may just look that way because of an interaction effect with egg size.

I don’t think we will be able to tease this out with so many combinations with no data unless we re-bin into more general groups or drop regions like florida.

When you look at the interactions you get this mess:

term estimate std.error statistic p.value
(Intercept) 0.0084412 0.0021032 4.0134820 0.0002045
Carapace_width -0.0000009 0.0000091 -0.0943493 0.9252164
Egg_stage2 -0.0000809 0.0010699 -0.0756063 0.9400402
Egg_stage3 -0.0022787 0.0018627 -1.2233692 0.2270410
Egg_stage4 -0.0003083 0.0018868 -0.1634093 0.8708683
Egg_stage5 -0.0000976 0.0014954 -0.0652598 0.9482327
Egg_stage6 0.0017296 0.0014954 1.1566106 0.2530393
Egg_stage7 0.0008058 0.0011896 0.6773941 0.5013419
Egg_stage8 0.0032515 0.0011402 2.8518326 0.0063469
Egg_stage9 0.0050981 0.0011481 4.4402655 0.0000511
regionLouisiana -0.0025628 0.0018863 -1.3586391 0.1804829
regionMS Bight -0.0068913 0.0014708 -4.6854313 0.0000225
regionTexas -0.0019992 0.0011914 -1.6779971 0.0997157
Egg_stage2:regionLouisiana 0.0006934 0.0015496 0.4474613 0.6565139
Egg_stage3:regionLouisiana 0.0037754 0.0022219 1.6991860 0.0956254
Egg_stage6:regionLouisiana 0.0002421 0.0020707 0.1169131 0.9074068
Egg_stage7:regionLouisiana 0.0015330 0.0017750 0.8636681 0.3919783
Egg_stage8:regionLouisiana 0.0003231 0.0016757 0.1928203 0.8478967
Egg_stage9:regionLouisiana -0.0016360 0.0017539 -0.9327504 0.3555224
Egg_stage2:regionMS Bight 0.0054356 0.0014105 3.8537158 0.0003387
Egg_stage3:regionMS Bight 0.0072943 0.0019297 3.7800064 0.0004262
Egg_stage4:regionMS Bight 0.0051813 0.0021123 2.4528845 0.0177779
Egg_stage5:regionMS Bight 0.0053603 0.0015804 3.3917707 0.0013813
Egg_stage3:regionTexas 0.0033493 0.0016112 2.0786925 0.0429032

Egg Stage Bins

Egg Volume ~ Egg Bins


Call:
lm(formula = egg_volume ~ es_bins, data = fecunddat)

Residuals:
       Min         1Q     Median         3Q        Max 
-0.0023169 -0.0011691 -0.0005623  0.0010144  0.0053023 

Coefficients:
               Estimate Std. Error t value Pr(>|t|)    
(Intercept)   0.0069257  0.0004597  15.066   <2e-16 ***
es_binsmiddle 0.0002403  0.0007623   0.315    0.754    
es_binslate   0.0006282  0.0005190   1.211    0.230    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.00172 on 70 degrees of freedom
Multiple R-squared:  0.0226,    Adjusted R-squared:  -0.005321 
F-statistic: 0.8095 on 2 and 70 DF,  p-value: 0.4492

Egg Volume ~ Region + Egg Bins

Mean Egg Volume GLM - Final

  • Carapace Width
  • Region (not enough sampling)
  • Season

term estimate std.error statistic p.value
(Intercept) 0.0070689 0.0038450 1.8384811 0.0704243
Carapace_width -0.0000009 0.0000247 -0.0375176 0.9701839
es_binsmiddle -0.0009484 0.0056032 -0.1692645 0.8660986
es_binslate 0.0043574 0.0046599 0.9351006 0.3530946
Carapace_width:es_binsmiddle 0.0000076 0.0000358 0.2134966 0.8315880
Carapace_width:es_binslate -0.0000235 0.0000297 -0.7903333 0.4321217

Percent development Models

Percent developing normally ~ molt stage

This one is nice and cut-and-dry, just an ANOVA to test the group differences.


Call:
lm(formula = Percent_fert ~ molt_stage, data = fecunddat)

Residuals:
      Min        1Q    Median        3Q       Max 
-0.308537 -0.044737  0.005263  0.091463  0.100000 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept)  0.94474    0.02251  41.967   <2e-16 ***
molt_stage3 -0.03620    0.02723  -1.329    0.188    
molt_stage4 -0.04474    0.03532  -1.267    0.209    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.09812 on 70 degrees of freedom
Multiple R-squared:  0.03062,   Adjusted R-squared:  0.002922 
F-statistic: 1.105 on 2 and 70 DF,  p-value: 0.3368

Groups are unbalanced, and it throws a warning, but we’re probably ok.

molt_stage n
2 19
3 41
4 13

Percent developing normally ~ Egg stage


Call:
lm(formula = Percent_fert ~ es_bins, data = fecunddat)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.31274 -0.01429  0.03571  0.08725  0.14375 

Coefficients:
              Estimate Std. Error t value Pr(>|t|)    
(Intercept)    0.96429    0.02543  37.925   <2e-16 ***
es_binsmiddle -0.10804    0.04216  -2.562   0.0126 *  
es_binslate   -0.05154    0.02870  -1.796   0.0769 .  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.09513 on 70 degrees of freedom
Multiple R-squared:  0.08878,   Adjusted R-squared:  0.06275 
F-statistic:  3.41 on 2 and 70 DF,  p-value: 0.03862

Percent developing normally ~ region


Call:
lm(formula = Percent_fert ~ region, data = fecunddat)

Residuals:
     Min       1Q   Median       3Q      Max 
-0.33429 -0.03429  0.04630  0.06571  0.09630 

Coefficients:
                 Estimate Std. Error t value Pr(>|t|)    
(Intercept)      0.900000   0.056987  15.793   <2e-16 ***
regionLouisiana  0.003704   0.060070   0.062    0.951    
regionMS Bight  -0.012500   0.066823  -0.187    0.852    
regionTexas      0.034286   0.059379   0.577    0.566    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.0987 on 69 degrees of freedom
Multiple R-squared:  0.03313,   Adjusted R-squared:  -0.008904 
F-statistic: 0.7882 on 3 and 69 DF,  p-value: 0.5046

Percent Development - All

This is a two-way crossed ANOVA comparing percent fertilization between egg stage bins and region with interactions.

# A tibble: 12 x 4
# Groups:   region [?]
   region    es_bins     n mean_fert
   <fct>     <fct>   <int>     <dbl>
 1 Florida   early       1     0.95 
 2 Florida   middle      1     0.95 
 3 Florida   late        1     0.8  
 4 Louisiana early       4     0.975
 5 Louisiana middle      2     0.675
 6 Louisiana late       21     0.912
 7 MS Bight  early       2     0.925
 8 MS Bight  middle      3     0.9  
 9 MS Bight  late        3     0.85 
10 Texas     early       7     0.971
11 Texas     middle      2     0.925
12 Texas     late       26     0.925

Call:
lm(formula = Percent_fert ~ region * es_bins, data = fecunddat)

Residuals:
   Min     1Q Median     3Q    Max 
-0.325 -0.025  0.025  0.075  0.100 

Coefficients:
                                Estimate Std. Error t value Pr(>|t|)    
(Intercept)                    9.500e-01  9.155e-02  10.376 4.26e-15 ***
regionLouisiana                2.500e-02  1.024e-01   0.244   0.8079    
regionMS Bight                -2.500e-02  1.121e-01  -0.223   0.8243    
regionTexas                    2.143e-02  9.788e-02   0.219   0.8274    
es_binsmiddle                  8.197e-16  1.295e-01   0.000   1.0000    
es_binslate                   -1.500e-01  1.295e-01  -1.159   0.2512    
regionLouisiana:es_binsmiddle -3.000e-01  1.518e-01  -1.976   0.0527 .  
regionMS Bight:es_binsmiddle  -2.500e-02  1.541e-01  -0.162   0.8717    
regionTexas:es_binsmiddle     -4.643e-02  1.488e-01  -0.312   0.7561    
regionLouisiana:es_binslate    8.690e-02  1.388e-01   0.626   0.5335    
regionMS Bight:es_binslate     7.500e-02  1.541e-01   0.487   0.6282    
regionTexas:es_binslate        1.036e-01  1.352e-01   0.766   0.4467    
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.09155 on 61 degrees of freedom
Multiple R-squared:  0.2646,    Adjusted R-squared:  0.132 
F-statistic: 1.995 on 11 and 61 DF,  p-value: 0.04436